package com.itheima.web.interceptor;

import com.itheima.domain.db.Admin;

//线程绑定工具类
public class AdminHolder {

    private static final ThreadLocal<Admin> local = new ThreadLocal<>();

    public static Admin get() {
        return local.get();
    }

    public static void set(Admin admin) {
        local.set(admin);
    }

    public static void remove() {
        local.remove();
    }
}
